package com.wbz.behavioral.strategy.strategy.impl;

import com.wbz.behavioral.strategy.strategy.DiscountStrategy;

/**
 * 固定金额折扣策略
 */
public class FixedAmountDiscountStrategy implements DiscountStrategy {
    private final double discountAmount;

    public FixedAmountDiscountStrategy(double discountAmount) {
        this.discountAmount = discountAmount;
    }

    @Override
    public double applyDiscount(double originalPrice) {
        return originalPrice - discountAmount;
    }
}
